from multiprocessing import Pool
import time


def worker(msg):
    print(msg)


def main():
    po = Pool(10)
    for i in range(0, 10):
        po.apply_async(worker, (i,))
    print('----start----')
    po.close()
    po.join()
    print('----end-----')
    time.sleep(2)
    


if __name__ == "__main__":
    main()
